package com.itheima.test2;

import java.io.FileNotFoundException;
import java.io.FileReader;

/**
 * @Author:gy
 * @Date: 2025/08/31 9:25
 * @Description:
 */
public class Demo1 {
    public static void main(String[] args) throws Exception {
        //创建字符输入流关联我们的文件
        FileReader fw = new FileReader("Day11\\b.txt");
        char[] chars = new char[2];
        int len;
        while ((len = fw.read(chars))!=-1) {
            //System.out.println(len);
            System.out.println(new String(chars,0,len));
        }
        fw.close();
    }
}
